// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from './router'
// import $ from 'jquery'
import 'bootstrap/dist/css/bootstrap.min.css'
import 'bootstrap/dist/js/bootstrap.min'

import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

import Vant from 'vant'
import 'vant/lib/index.css'

import WebSocket from './components/WebSocket.vue'

import globalfunc from './js/globalfunc.js'
import globaldata from './js/globaldata.js'

import globalproto from './js/proto.js'

import globalconf from './js/confjson.js'
import globalconfem from './js/confenum.js'
import globalconfex from './js/confex.js'

import pubmud from './js/pubmud.js'

Vue.prototype.gfunc = globalfunc
Vue.prototype.gdata = globaldata

Vue.prototype.proto = globalproto

Vue.prototype.conf = globalconf
Vue.prototype.confem = globalconfem
Vue.prototype.confex = globalconfex

Vue.prototype.pmud = pubmud

Vue.prototype.wsreq = globaldata.wsreq
Vue.prototype.wssend = globaldata.wssend

Vue.prototype.jxrandom = globalfunc.jxrandom
Vue.prototype.jxrandomint = globalfunc.jxrandomint
Vue.prototype.jxrandomarr = globalfunc.jxrandomarr
Vue.prototype.jxrandomkey = globalfunc.jxrandomkey
Vue.prototype.jxrandomvalue = globalfunc.jxrandomvalue

Vue.prototype.jxdom = globalfunc.jxdom
Vue.prototype.jxcbutton = globalfunc.jxcbutton
Vue.prototype.jxctext = globalfunc.jxctext
Vue.prototype.jxcspan = globalfunc.jxcspan
Vue.prototype.jxcvue = globalfunc.jxcvue

Vue.prototype.jxdebug = globaldata.jxdebug
Vue.prototype.jxwdtext = globaldata.jxwdtext
Vue.prototype.jxwdtextc = globaldata.jxwdtextc
Vue.prototype.jxwdtextmud = globaldata.jxwdtextmud
Vue.prototype.jxwdmsg = globaldata.jxwdmsg
Vue.prototype.jxwdmsgs = globaldata.jxwdmsgs

Vue.prototype.jxpage = globaldata.jxpage
Vue.prototype.jxmodfunc = globaldata.jxmodfunc
Vue.prototype.jxmodinfo = globaldata.jxmodinfo

Vue.prototype.jxtoast = globalfunc.jxtoast
Vue.prototype.jxpop = globalfunc.jxpop

Vue.component('websocket', WebSocket)

Vue.config.productionTip = false

Vue.use(ElementUI)
Vue.use(Vant)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  router,
  components: {
    App
  },
  template: '<App/>'
})
